package com.diudiutechnology.www.yadiudiu.yadiudiu.mine.MyActivity;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.diudiutechnology.www.yadiudiu.yadiudiu.mine.MyAdapter.OrderDetailsAdapter;
import com.diudiutechnology.www.yadiudiu.util.utils.Utils;
import com.diudiutechnology.www.yadiudiu.util.view.ListViewForScrollView;
import com.diudiutechnology.www.yadiudiu.yadiudiu.model.BuyACarFragmentModel;
import com.diudiutechnology.www.yadiudiu.R;

import java.util.ArrayList;
import java.util.List;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2017/9/1.
 * 我的订单明细
 */

public class TheOrderDetailsActivity extends Activity implements View.OnClickListener {
    @Bind(R.id.retur)//返回
            LinearLayout retur;

    @Bind(R.id.imageView)
    ImageView imageView;//地图
    Context context;

    @Bind(R.id.release_listview)
    ListViewForScrollView release_listview;
    OrderDetailsAdapter orderDetailsAdapter;
    String pos="0";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_the_order_details);
        ButterKnife.bind(this);
        context = this;
        initView();
    }

    private void initView() {
        retur.setOnClickListener(this);
        imageView.setLayoutParams(new LinearLayout.LayoutParams(Utils.getScreenWidth(context),Utils.getScreenHeight(context)/3));

//        orderDetailsAdapter= new OrderDetailsAdapter(context);
//        release_listview.setAdapter(orderDetailsAdapter);

        List<BuyACarFragmentModel> buycar=new ArrayList<>();
        for (int i=0;i<5;i++){
            BuyACarFragmentModel model=new BuyACarFragmentModel();
            model.setName("只是想改个名字");
            buycar.add(model);
        }
       // orderDetailsAdapter.addItem(buycar);
    }


    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.retur:
                finish();
                break;
        }
    }
}
